CREATE TABLE "InventoryDepartmentalStock" (
	"InventoryDepartmentalStockId" serial primary Key,
	"InventoryProductId" int references "InventoryProduct"("InventoryProductId"),
	"TaxId" int4 REFERENCES "LookupValue"("LookupValueId"),
	"QuantityIn" int4 NULL,
	"QuantityOut" int4 NULL,
	"BatchNumber" varchar(50) NULL,
	"ExpiryDate" date NULL,
	"PurchaseRate" numeric(8, 2) NULL,	
	"InventoryStockId" int references "InventoryStock"("InventoryStockId"),
	"CreatedBy" int4 NULL,
	"CreatedDate" timestamp NULL,
	"ModifiedBy" int4 NULL,
	"ModifiedDate" timestamp null,
	"InventoryDepartmentId" int references "InventoryDepartment"("InventoryDepartmentId")
);

alter table "IndentHeader" add column "InventoryDepartmentId" int references "InventoryDepartment"("InventoryDepartmentId");

alter table "IssueHeader" add column "InventoryWareHouseId" int references "InventoryWareHouse"("InventoryWareHouseId");
